package com.study.chain.auth.optimize;

import com.study.chain.auth.Member;
import org.apache.commons.lang.StringUtils;

public class LoginHandler extends Handler {
    @Override
    protected void doHandler(Member member) {
        if(StringUtils.isEmpty(member.getLoginName()) ||
                StringUtils.isEmpty(member.getLoginPass())){
            System.out.println("用户名和密码为空");
            return;
        }
        System.out.println("用户名和密码不为空，可以往下执行");
        if(this.nextHandler != null){
            this.nextHandler.doHandler(member);
        }
    }
}
